let SYSTEM_INFO = uni.getSystemInfoSync()
// 安全区域
export let getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 10

// 胶囊按钮

export let getTitleBarHeight = () => {
	if (uni.getMenuButtonBoundingClientRect) {
		let {
			top,
			height
		} = uni.getMenuButtonBoundingClientRect()
		return (top - getStatusBarHeight()) * 2 + height
	}
	return 50
}

export const getNavBarHeight = () => {
	return getStatusBarHeight() + getTitleBarHeight()
}

export const getIconLeft = () => {
	// #ifdef MP-TOUTIAO
	return tt.getCustomButtonBoundingClientRect().leftIcon.width
	//  #endif

	// #ifndef MP-TOUTIAO
	return 0
	// #endif
}